package com.lovo.homeWork;

/**
 * 交警
 */
public class Police {
    private String name;

    public Police(){

    }

    public Police(String name) {
        this.name = name;
    }

    public void dispose(Police police, Driver driver, Rule rule, Punish punish){
        System.out.println("交警" + police.getName() + "对司机" + driver.getName() + "的" + rule.getAction()
                + "行为进行了" + punish.getPenalize() + "的处罚");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
